<html>
<head><meta charset="utf-8"><title>possible incremental bug on macOS · t-compiler · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/index.html">t-compiler</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/possible.20incremental.20bug.20on.20macOS.html">possible incremental bug on macOS</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="208614497"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/possible%20incremental%20bug%20on%20macOS/near/208614497" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jacob Pratt <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/possible.20incremental.20bug.20on.20macOS.html#208614497">(Aug 31 2020 at 21:00)</a>:</h4>
<p>Hello. I think I may have discovered a bug in incremental compilation. On a couple occasions, I've had CI reliably fail when cache is used. I initially removed the cache upon suggestion from another user, but now that it's re-arisen, I believe this to be a compiler bug. It appears as if this only occurs on macOS; I run Linux, so I'm unable to reproduce this manually.</p>
<p>You can see an example failure in the "Test (stable, macOs-latest)" section here: <a href="https://github.com/time-rs/time/runs/1052989207?check_suite_focus=true">https://github.com/time-rs/time/runs/1052989207?check_suite_focus=true</a><br>
Ignore the other failures, as those are wholly unrelated. The error thrown is</p>
<div class="codehilite"><pre><span></span><code>error[E0463]: can&#39;t find crate for `serde_derive` which `serde` depends on
##[error]  --&gt; src/serde/timestamp.rs:28:5
   |
28 | use serde::{Deserialize, Deserializer, Serialize, Serializer};
</code></pre></div>


<p>Needless to say this doesn't make much sense, given that the crate exists and was used in a previous compilation (albeit on a different CI run, but that shouldn't matter due to cache).</p>
<p>There is an older CI build on the time-rs/time repo that I can pull up if desired.</p>



<a name="208615046"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/possible%20incremental%20bug%20on%20macOS/near/208615046" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/possible.20incremental.20bug.20on.20macOS.html#208615046">(Aug 31 2020 at 21:05)</a>:</h4>
<p><span class="user-mention" data-user-id="245610">@Jacob Pratt</span> There is a known issue with GitHub's cache action corrupting the <code>target</code> directory on macOS.  See <a href="https://github.com/actions/cache/issues/403">https://github.com/actions/cache/issues/403</a> and <a href="https://github.com/rust-lang/cargo/issues/8603">https://github.com/rust-lang/cargo/issues/8603</a> for more detail.</p>



<a name="208615230"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/possible%20incremental%20bug%20on%20macOS/near/208615230" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jacob Pratt <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/possible.20incremental.20bug.20on.20macOS.html#208615230">(Aug 31 2020 at 21:06)</a>:</h4>
<p>Ah, so it's on GitHub's end. Good news I suppose. I'll just disable caching on macOS for now. Thanks for the info!</p>



<a name="208661041"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/possible%20incremental%20bug%20on%20macOS/near/208661041" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> teor <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/possible.20incremental.20bug.20on.20macOS.html#208661041">(Sep 01 2020 at 08:59)</a>:</h4>
<p><span class="user-mention" data-user-id="245610">@Jacob Pratt</span> you could also use GNU tar as a workaround, it seems the issue only occurs with BSD tar.</p>
<p>Here's an example of that change: <a href="https://github.com/shadowsocks/shadowsocks-rust/commit/e88a536bd43f2489c43106b950c6dff2a70785e5">https://github.com/shadowsocks/shadowsocks-rust/commit/e88a536bd43f2489c43106b950c6dff2a70785e5</a></p>



<a name="208682550"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/possible%20incremental%20bug%20on%20macOS/near/208682550" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jacob Pratt <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/possible.20incremental.20bug.20on.20macOS.html#208682550">(Sep 01 2020 at 12:56)</a>:</h4>
<p>Yes, I wound up going with that approach after I ran across the comment myself.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>